package com.cmict.data.form.api.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cmict.data.form.api.entity.DynamicBeanMap;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author liutao
 * @date 2022/12/12
 */

@Mapper

public interface DynamicMapper extends BaseMapper {

    @DS("slave")
    int save(DynamicBeanMap beanMap);
    @DS("slave")
    int update(DynamicBeanMap beanMap);
    /**
     * @param tableName 表名
     * @param tableFiledList 表字段集合
     * @param tableValueList 表字段值集合
     */
    @DS("slave")
    int batchSave(@Param("tableName")String tableName,
                 @Param("tableFiledList") List<String> tableFiledList,
                 @Param("tableValueList")List<Object> tableValueList);


}
